Skip to content

Restic resticprofile#14

Merged
tyvsmith merged 7 commits into
mainfrom
restic-resticprofile
Jun 27, 2026
Merged

Restic resticprofile#14
tyvsmith merged 7 commits into
mainfrom
restic-resticprofile

Conversation

@tyvsmith

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 15, 2026 05:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a restic/resticprofile-based backup setup that’s gated by a new backup: true profile flag, along with a 1Password-backed secret caching mechanism for restic credentials and an updated 1Password reference for the age key.

Changes:

  • Add restic/resticprofile packages and a backup profile flag, and propagate it via .chezmoi.toml.tmpl.
  • Add resticprofile configuration + a run_onchange script to register systemd --user timers for backup/check schedules on Linux personal machines.
  • Add an op-cached-secret template helper and new restic secret templates that cache 1Password values to disk after first fetch.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/decrypt-secrets.sh Updates the 1Password reference used to fetch the age key for local decrypt tooling.
run_onchange_70-configure-restic.sh.tmpl New script to register resticprofile schedules as user systemd timers when backup: true.
run_onchange_50-configure-hyprpm.sh.tmpl Adds documentation + a workaround to commit staged hyprpm plugin state across filesystems.
run_before_01-decrypt.sh.tmpl Refactors age key setup into a reusable ensure_secret helper and updates the 1Password reference.
README.md Updates repo tree documentation to reflect the decrypt script naming/behavior and restic secret handling.
dot_config/resticprofile/private_rest-pass.tmpl New cached secret template for REST transport password.
dot_config/resticprofile/private_profiles.yaml.tmpl New resticprofile configuration (REST backend, schedules, excludes, check policy).
dot_config/resticprofile/private_password.tmpl New cached secret template for restic repository password.
CLAUDE.md Updates documentation for the decrypt run_before script and restic secret approach.
.chezmoitemplates/op-cached-secret New shared template helper to read from on-disk cache or 1Password.
.chezmoiignore.tmpl Attempts to skip resticprofile config on non-backup profiles (currently with an incorrect path).
.chezmoidata/profiles.yaml Documents and enables the new backup flag for the arch profile.
.chezmoidata/packages.yaml Adds restic and resticprofile packages.
.chezmoi.toml.tmpl Adds backup to template data so it can be referenced as .backup in templates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .chezmoiignore.tmpl
Comment on lines +30 to +31
.config/resticprofile
.config/resticprofile/**
# servers/containers (debian-server, devpod, Proxmox/LXC) are deliberately excluded.
# Reruns automatically when the profile or this script changes (hashes below).
# profiles.yaml: {{ include "dot_config/resticprofile/private_profiles.yaml.tmpl" | sha256sum }}
# (restic secrets are self-caching templates in dot_config/resticprofile/; not hashed — they don't affect schedules)

MACHINES: $host namespaces the repo, so each machine has its own repo under
/ty/<host>. Add a machine by giving it a hostname; nothing else changes.
Macs use Time Machine instead and render no profiles (see guard).
tyvsmith and others added 5 commits June 27, 2026 12:30
…udes

- Add a `backup` tri-state gate to cascade-filter (mirrors work/decrypt) and
  mark restic/resticprofile `backup: true` so the backup stack installs only on
  profiles with `backup: true` — servers/containers/Macs stay clean.
- Add the root `system` profile (/etc) with a sudo-guarded timer registration in
  run_onchange_70; user `default` timers still register without sudo.
- Capture flatpak + AppImage + language-manager manifests alongside the pacman
  lists in the staged system-state record.
- Excludes: add ~/Backups (96G), Steam workshop/compatibilitytools.d (18G),
  and scope VM images to ~/.windows + ~/vms dirs instead of a global **/*.img
  (which would have excluded the LUKS header backups). Verified ~39 GiB of a
  4.9 TB home via restic --dry-run (clean exit, no warnings).
- Docs: add the `backup` flag + restic section to CLAUDE.md, refresh the stale
  profile tables in CLAUDE.md and README.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Remove both from the hyprpm repo/enable lists and delete the now-dead
hyprglass plugin block from looknfeel.conf.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…s present

run_onchange_70 now escalates itself when it can — passwordless sudo (no prompt)
or an interactive `chezmoi apply` where sudo prompts on the terminal — and only
prints the manual command for non-interactive applies (cron/CI/piped). A declined
or failed prompt warns and continues instead of aborting apply.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…oads/shims

Strip per-line size/explanation annotations from the exclude block, leaving only
clean category headers (the two load-bearing facts — Dropbox→NAS mirror and the
*.img/LUKS-header hazard — fold into their section headers). Also exclude
~/.local/share/mise/{downloads,shims} alongside installs (cache + dangling symlinks
into the excluded installs/ tree).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`restic check` verifies the whole repository, not a tag or source. The system
profile shares its repo with default, so default/check already validates the
system-tagged /etc snapshots — a second check just re-reads the same repo.
Removing it: 4 timers -> 3 (default backup+check, system backup).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tyvsmith tyvsmith merged commit 6b9de46 into main Jun 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants